xg_main: If XEN_DOMCTL_gdbsx_guestmemio fails then force error.
authorDon Slutz <dslutz@verizon.com>
Fri, 10 Jan 2014 21:57:00 +0000 (16:57 -0500)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 15 Jan 2014 13:01:31 +0000 (13:01 +0000)
commitf91dc2000a86d0af00f52b527fd28df00070f9cb
tree1653e5c7496e4e5e542b248f4ae0dfb3a7af6668
parentdfbd3d62cd4a8e6e51be7896300e59c9ee0b8f82
xg_main: If XEN_DOMCTL_gdbsx_guestmemio fails then force error.

Without this gdb does not report an error.

With this patch and using a 1G hvm domU:

(gdb) x/1xh 0x6ae9168b
0x6ae9168b:     Cannot access memory at address 0x6ae9168b

Drop output of iop->remain because it most likely will be zero.
This leads to a strange message:

ERROR: failed to read 0 bytes. errno:14 rc:-1

Add address to write error because it may be the only message
displayed.

Note: currently XEN_DOMCTL_gdbsx_guestmemio does not change 'iop' on
error and so iop->remain will be zero.

Signed-off-by: Don Slutz <dslutz@verizon.com>
Acked-by: Mukesh Rathor <mukesh.rathor@oracle.com>
tools/debugger/gdbsx/xg/xg_main.c